<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <script type="text/javascript" src="${ctx}/appjs/transfer/memberRefundApply.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>财务管理</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>操作记录</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <div class="columns pull-left">
                        <h5 class="font-bold">操作记录</h5>
                    </div>
                    <div class="ibox-tools">
                        <a class="close-link">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>

                <div class="ibox-content">
                    <form class="form-horizontal m-t" id="frmMemberRefundApply">
                        <input type="hidden" name="memberId" id="memberId">
                        <input type="hidden" name="allAmount" id="allAmount">
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">运营商代码：</label>
                            <div class="col-sm-2">
                                <span>${memberRefundApply.tenantCode}</span>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">会员名：</label>
                            <div class="col-sm-2">
                                <span>${memberInfo.nickname2}</span>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">会员手机号：</label>
                            <div class="col-sm-2">
                                <span>${memberInfo.mobile}</span>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">发起来源：</label>
                            <div class="col-sm-2">
                                <span>
                                    <c:if test="${memberRefundApply.refundSource == '0'}">公众号</c:if>
                                    <c:if test="${memberRefundApply.refundSource == '1'}">APP</c:if>
                                    <c:if test="${memberRefundApply.refundSource == '2'}">小程序</c:if>
                                    <c:if test="${memberRefundApply.refundSource == '3'}">运营商后台</c:if>
                                </span>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">提现订单号：</label>
                            <div class="col-sm-2">
                                <span>${transferOrder.outTradeNo}</span>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">提现金额：</label>
                            <div class="col-sm-2">
                                <span>${memberRefundApply.refundAmount}</span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">提现途径：</label>
                            <div class="col-sm-2">
                               <span>
                                    <c:if test="${memberRefundApply.refundBy == '0'}">微信</c:if>
                                    <c:if test="${memberRefundApply.refundBy == '1'}">支付宝</c:if>
                                    <c:if test="${memberRefundApply.refundBy == '2'}">银行卡</c:if>
                                </span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">提现账户：</label>
                            <div class="col-sm-2">
                                <span>${memberRefundApply.memberMobile}</span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">对应真实姓名：</label>
                            <div class="col-sm-2">
                                <span>${memberRefundApply.memberRealName}</span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">银行名称：</label>
                            <div class="col-sm-2">
                                <span>
                                    <c:if test="${memberRefundApply.refundBankCode == '1002'}">工商银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1005'}">农业银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1003'}">建设银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1026'}">中国银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1020'}">交通银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1001'}">招商银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1066'}">邮储银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1006'}">民生银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1010'}">平安银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1021'}">中信银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1004'}">浦发银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1009'}">兴业银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1022'}">光大银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1027'}">广发银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1025'}">华夏银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1056'}">宁波银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4836'}">北京银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1024'}">上海银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '1054'}">南京银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4755'}">长子县融汇村镇银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4216'}">长沙银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4051'}">浙江泰隆商业银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4753'}">中原银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4761'}">企业银行（中国）</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4036'}">顺德农商银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4752'}">衡水银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4756'}">长治银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4767'}">大同银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4115'}">河南省农村信用社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4150'}">宁夏黄河农村商业银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4156'}">山西省农村信用社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4166'}">安徽省农村信用社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4157'}">甘肃省农村信用社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4153'}">天津农村商业银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4113'}">广西壮族自治区农村信用社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4108'}">陕西省农村信用社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4076'}">深圳农村商业银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4052'}">宁波鄞州农村商业银行</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4764'}">浙江省农村信用社联合社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4217'}">江苏省农村信用社联合社</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4072'}">江苏紫金农村商业银行股份有限公司</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4769'}">北京中关村银行股份有限公司</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4778'}">星展银行（中国）有限公司</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4766'}">枣庄银行股份有限公司</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4758'}">口联合农村商业银行股份有限公司</c:if>
                                    <c:if test="${memberRefundApply.refundBankCode == '4763'}">南洋商业银行（中国）有限公司</c:if>
                                </span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">申请时间：</label>
                            <div class="col-sm-2">
                                <span><fmt:formatDate value="${memberRefundApply.createdTime}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">到账时间：</label>
                            <div class="col-sm-2">
                                <span>${memberRefundApply.paymentTime}</span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">提现状态：</label>
                            <div class="col-sm-2">
                               <span>
                                    <c:if test="${memberRefundApply.status == '0'}">未审核</c:if>
                                    <c:if test="${memberRefundApply.status == '1'}">已处理</c:if>
                                    <c:if test="${memberRefundApply.status == '2'}">驳回</c:if>
                                    <c:if test="${memberRefundApply.status == '3'}">提款中</c:if>
                                    <c:if test="${memberRefundApply.status == '4'}">已到账</c:if>
                                    <c:if test="${memberRefundApply.status == '5'}">转账失败</c:if>
                                </span>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-3 col-form-label text-right">操作时间：</label>
                            <div class="col-sm-2">
                                <span><fmt:formatDate value="${memberRefundApply.lastUpdatedTime}"
                                                      pattern="yyyy-MM-dd HH:mm:ss"/></span>
                            </div>
                        </div>

                        <%--<div class="form-group row">--%>
                            <%--<label class="col-sm-3 col-form-label text-right">失败重试次数：</label>--%>
                            <%--<div class="col-sm-2">--%>
                                <%--<span>${transferOrder.retryTransferNum}</span>--%>
                            <%--</div>--%>
                        <%--</div>--%>

                        <div class="form-group">
                            <div class="col-sm-3 col-sm-offset-8 text-right">
                                <button type="button" onclick="javascript:window.history.back()"
                                        class="btn btn-primary">返回
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">

    function transferOutAllAmount() {
        var val = $("#allAmount").val();
        $("#refundAmount").val(val)
    }

    $('#selectMemberAndAccountByMobile').click(function () {
        $.ajax({
            url: prefix + "/selectMemberAndAccountByMobile",
            type: "GET",
            data: {
                'mobile': $("#mobile").val(),
            },
            success: function (data) {
                if (data.status == 200) {
                    $("#nickname").val(data.data.nickname2),
                        $("#allAmount").val(data.data.account),
                        $("#memberId").val(data.data.memberId),
                        $("#userMobile").val(data.data.mobile),
                        $("#totalAmount").text("可以现金额" + data.data.account + "元")
                } else {
                    layer.msg(data.message);
                }
            }
        });
    })

    addMemberRefundApply.init();
</script>
</body>
</html>
